#include <cstdio>
#include <set>
using namespace std;
const int N = 100010;
int n, t;
int q[N];
int p[N];
set< int > s;
int main() {
	// freopen("testdata.in", "r", stdin);
	// freopen("testdata.out", "w", stdout);
	scanf("%d", &t);
	while (t--) {
		scanf("%d", &n);
		bool flag = true;
		s.clear();
		for (int i = 1; i <= n; ++i) {
			p[i] = 0;
			s.insert(-i);
		}
		for (int i = 1; i <= n; ++i) {
			scanf("%d", &q[i]);
		}
		p[1] = q[1];
		s.erase(-q[1]);
		for (int i = 2; i <= n; ++i) {
			set< int >::iterator iter = s.lower_bound(-q[i]);
			if (iter != s.end()) {
				p[i] = -*iter;
				s.erase(-p[i]);
			} else
				flag = false;
		}
		if (flag) {
			for (int i = 1; i <= n; ++i) {
				printf("%d ", p[i]);
			}
		} else
			printf("-1");
		putchar('\n');
	}
	// fclose(stdin);
	// fclose(stdout);
	return 0;
}